﻿@model Bonobo.Git.Server.Models.ResetPasswordModel

@{
    ViewBag.Title = Resources.Home_ResetPassword_Title;
}

<h1>@Resources.Home_ResetPassword_Title</h1>


@using (Html.BeginForm("ResetPassword", "Home", FormMethod.Post, new { @class = "pure-form pure-form-aligned" }))
{
    @Html.ValidationSummary(false, Resources.Home_ResetPassword_Failed)

    @Html.AntiForgeryToken()
    <fieldset>

        @Html.HiddenFor(m => m.Username)
        @Html.HiddenFor(m => m.Digest)

        <div class="pure-control-group">
            @Html.LabelFor(m => m.Password)
            @Html.PasswordFor(m => m.Password)<em>*</em>
            @Html.ValidationMessageFor(m => m.Password)
        </div>

        <div class="pure-control-group">
            @Html.LabelFor(m => m.ConfirmPassword)
            @Html.PasswordFor(m => m.ConfirmPassword)<em>*</em>
            @Html.ValidationMessageFor(m => m.ConfirmPassword)
        </div>

        <div class="pure-controls">
            <button type="submit" class="pure-button pure-button-primary">@Resources.Home_ResetPassword_ResetPassword</button>
        </div>
    </fieldset>
}
@if (TempData["ResetSuccess"] != null)
{
    if ((bool)TempData["ResetSuccess"])
    {
        <div class="summary-success">
            <p>@Resources.Home_ResetPassword_Success</p>
        </div>
    }
    else
    {
        <div class="summary-error">
            <p>@Resources.Home_ResetPassword_Failed</p>
        </div>
    }
}